<template>
    <div class='warning_warp '>
            <div class='time_set'>
                <el-button @click='addItem' type="primary">添加报警用户</el-button>
                <el-button @click='gsmaddr' type="primary">报警服务器设置</el-button>
                <el-button @click='setdoaddr' type="primary">声光报警设备设置</el-button>
                <el-button @click='setofftime' type="primary">离线报警时长设置</el-button>
                <el-form :rules="rules2" :model="phoneForm">
                    <el-form-item  prop="phone">
                        <el-input placeholder="请输入手机号" v-model.number="phoneForm.phone" >
                            <el-button slot="append" @click="sendMessage()">短信测试</el-button>
                        </el-input>
                    </el-form-item>
                </el-form>
                <!-- <span class="zhushi" style="margin-left:15px">*最多可添加20个用户</span> -->
            </div>
            <div style="clear:both"></div>
        <div class="table_wrap op table border" style="margin-top:20px;"> 
            <el-table
                :data="tableData"
                style="width: 100%">
            <el-table-column
                prop="name"
                label="联系人"
                width="">
            </el-table-column>
            <el-table-column
                prop="telephone"
                label="手机号码"
                width="">
            </el-table-column>
            <el-table-column
                prop="job"
                label="职业"
                width="">
            </el-table-column>
            <el-table-column
                prop="department"
                label="部门"
                width="">
            </el-table-column>
            <el-table-column
                prop="limit"
                label="报警等级">
            </el-table-column>
            <el-table-column
                prop="phone"
                label="是否启用电话报警">
                <template slot-scope="scope">
                    <span v-if="scope.row.mode == 1">短信</span>
                    <span v-if="scope.row.mode == 2">电话</span>
                </template>
            </el-table-column>
            <el-table-column
                prop="phone"
                label="编辑">
                <template slot-scope="scope">
                    <el-button @click.native.prevent = 'editItem(scope.$index)' type="primary" size="small">编辑</el-button>
                    <el-button @click.native.prevent = 'deleteItem(scope.$index)' type="danger" size="small">删除</el-button>
                </template>
            </el-table-column>

            </el-table>
        </div>
        <!-- 弹窗编辑 -->
        <!-- 弹窗表单 -->
        <el-dialog
            title="联系人属性"
            :visible.sync="dialogFormVisible"
            :append-to-body = 'true'
          width="50%"
        >
            <el-form  :rules="rules" :model="activeItem">
                <el-form-item
                    label="联系人"
                    :label-width="formLabelWidth">
                    <el-input
                        v-model="activeItem.name"
                        autocomplete="off" maxlength="10">
                    </el-input>
                </el-form-item>
                <el-form-item
                    label="联系方式"
                    :label-width="formLabelWidth"  prop="telephone">
                    <el-input
                        :disabled="addStatus"
                        v-model="activeItem.telephone"
                        autocomplete="off" maxlength="11">
                    </el-input>
                </el-form-item>
                <el-form-item
                    label="职业"
                    :label-width="formLabelWidth">
                    <el-input
                        v-model="activeItem.job"
                        autocomplete="off" maxlength="10">
                    </el-input>
                </el-form-item>
                <el-form-item
                    label="部门"
                    :label-width="formLabelWidth">
                    <el-input
                        v-model="activeItem.department"
                        autocomplete="off" maxlength="10">
                    </el-input>
                </el-form-item>
                <el-form-item
                    label="报警等级"
                    :label-width="formLabelWidth">
                    <el-select v-model="activeItem.limit" placeholder="请选择报警等级">
                        <el-option label="1" value="1"></el-option>
                        <el-option label="2" value="2"></el-option>
                        <el-option label="3" value="3"></el-option>
                        <el-option label="4" value="4"></el-option>
                        <el-option label="5" value="5"></el-option>
                        <el-option label="6" value="6"></el-option>
                        <el-option label="7" value="7"></el-option>
                        <el-option label="8" value="8"></el-option>
                        <el-option label="9" value="9"></el-option>
                    </el-select>
                </el-form-item>
                <p class="set_dengji zhushi">*0-9级报警等级依次提高，设置后只能接收到同等级及以上等级的报警信息</p>

                <el-form-item
                    label="报警方式:"
                    :label-width="formLabelWidth">
                    <el-radio class="fangshi" :disabled="addStatus" v-model="activeItem.mode" label="1">短信</el-radio>
                    <el-radio class="fangshi" :disabled="addStatus" v-model="activeItem.mode" label="2">电话</el-radio>
                </el-form-item>
                <p class="set_dengji zhushi">*电话报警功能添加设置后不可编辑修改</p>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="save">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 报警服务器弹窗表单 -->
        <el-dialog
            title="报警服务器设置"
            :visible.sync="dialogGsmaddr"
            :append-to-body = 'true'
          width="50%"
        >
            <el-form  :rules="rules" :model="catIp">
                <el-form-item
                    label="报警服务器"
                    :label-width="formLabelWidth">
                    <span :class="catIp.enable ? 'fangshi1':'fangshi2'">关闭</span>
                    <el-switch
                        v-model="catIp.enable"
                        active-color="#13ce66"
                        inactive-color="#ff4949"
                        @change="enableChange">
                    </el-switch>
                    <span :class="catIp.enable ? 'fangshi2':'fangshi1'">开启</span>
                </el-form-item>
                <el-form-item
                    label="IP"
                    prop="ip"
                    :label-width="formLabelWidth">
                    <el-input
                        v-model="catIp.ip"
                        autocomplete="off">
                    </el-input>
                </el-form-item>
                <el-form-item
                    label="端口号"
                    :label-width="formLabelWidth">
                    <el-input
                        v-model="catIp.port"
                        autocomplete="off">
                    </el-input>
                </el-form-item>
                
                <el-form-item
                    label="语音报警"
                    :label-width="formLabelWidth">
                    <span :class="catIp.voiceenable ? 'fangshi1':'fangshi2'">关闭</span>
                    <el-switch
                        v-model="catIp.voiceenable"
                        active-color="#13ce66"
                        inactive-color="#ff4949">
                    </el-switch>
                    <span :class="catIp.voiceenable ? 'fangshi2':'fangshi1'">开启</span>
                </el-form-item>
                <p class="set_dengji zhushi">*语音报警基于报警服务器开启状态下生效</p>
                <el-form-item
                    label="语音报警等级"
                    :label-width="formLabelWidth">
                    <el-select v-model="catIp.voicelimit" placeholder="请选择报警等级">
                        <el-option label="1" value="1"></el-option>
                        <el-option label="2" value="2"></el-option>
                        <el-option label="3" value="3"></el-option>
                        <el-option label="4" value="4"></el-option>
                        <el-option label="5" value="5"></el-option>
                        <el-option label="6" value="6"></el-option>
                        <el-option label="7" value="7"></el-option>
                        <el-option label="8" value="8"></el-option>
                        <el-option label="9" value="9"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="closeGsmaddr()">取 消</el-button>
                <el-button type="primary" @click="save2">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 声光信息弹窗表单 -->
        <el-dialog
            title="声光报警设备设置"
            :visible.sync="dialogDoaddr"
            :append-to-body = 'true'
          width="50%"
        >
            <el-form  :rules="rules" :model="doaddr">
                <el-form-item label="选择关联设备节点">
                    <el-cascader v-model="cascader" :options="options"></el-cascader>
                </el-form-item>
                <el-form-item
                    label="声光报警"
                    :label-width="formLabelWidth">
                    <span :class="doaddr.enable ? 'fangshi1':'fangshi2'">关闭</span>
                    <el-switch
                        v-model="doaddr.enable"
                        active-color="#13ce66"
                        inactive-color="#ff4949">
                    </el-switch>
                    <span :class="doaddr.enable ? 'fangshi2':'fangshi1'">开启</span>
                </el-form-item>
                <el-form-item
                    label="报警等级"
                    :label-width="formLabelWidth">
                    <el-select v-model="doaddr.limit" placeholder="请选择报警等级">
                        <el-option label="1" value="1"></el-option>
                        <el-option label="2" value="2"></el-option>
                        <el-option label="3" value="3"></el-option>
                        <el-option label="4" value="4"></el-option>
                        <el-option label="5" value="5"></el-option>
                        <el-option label="6" value="6"></el-option>
                        <el-option label="7" value="7"></el-option>
                        <el-option label="8" value="8"></el-option>
                        <el-option label="9" value="9"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="closeDoaddr()">取 消</el-button>
                <el-button type="primary" @click="save3">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 离线报警时长表单 -->
        <el-dialog
            title="离线报警时长设置"
            :visible.sync="dialogOfftime"
            :append-to-body = 'true'
          width="50%"
        >
            <el-form >
                <el-form-item
                    label="离线报警时长(ms)"
                    :label-width="formLabelWidth">
                    <el-input
                        v-model="offtime"
                        autocomplete="off">
                    </el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="closeOfftimer()">取 消</el-button>
                <el-button type="primary" @click="save4">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
//这里要俺需要引入，我不是一个对象
import {isvalidPhone} from '../../assets/js/validate'
export default {
    data() {
        /*ip正则验证*/
        var validcodeip = (rule, value, callback) => {
        const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
        if (reg.test(value)) {
            callback();
        } else {
            return callback(new Error('输入格式不合法！'));
        }
        };
        //定义一个全局的变量，谁用谁知道
        var validPhone=(rule, value,callback)=>{
            if (!value){
                callback(new Error('请输入电话号码'))
            }else  if (!isvalidPhone(value)){
                callback(new Error('请输入正确的11位手机号码'))
            }else {
                callback()
            }
        }
        return {
            tableData:[],
            dialogGsmaddr:false,//报警服务器设置弹框
            dialogFormVisible:false,//报警用户弹框
            dialogDoaddr:false,//声光报警弹框
            dialogOfftime:false,//离线报警时长
            addStatus:true,//编辑状态
            formLabelWidth:'125px',
            activeItem:{//报警用户信息
                telephone:"",
                name:'',
                job:'',
                department:'',
                mode:'1',
                limit:9,
            },
            
            catIp:{//报警服务器信息
                ip:'',
                port:'',
                enable:'',//1开启报警服务器  0 关闭报警服务器 本字段可单独发送
                voiceenable:'',//1开启报警服务器语音报警  0 关闭报警服务器语音报警 需要基于报警服务器使能
                voicelimit:9//语音报警级别
            },
            doaddr:{

            },
            offtime:0,//离线报警时长
            rules: { //规则
                telephone: [
                    { required: true, trigger: 'blur', validator: validPhone }//这里需要用到全局变量
                ],
                ip: [{validator:validcodeip,trigger:'blur'}],
            },
            rules2: {
                phone: [
                    { required: true, trigger: 'blur', validator: validPhone }//这里需要用到全局变量
                ],
            },
            cascader:[],
            cascaderProps: {
                label: 'label',
                value: 'value',
                children: 'children',
            },
            options:[],//声光信息
            phoneForm:{
                phone:'',
            }
            
            
        }
    },
    created(){
        this.getData()
        this.getSystem()
        this.getdoaddr()
        this.getdevlist()
        this.getofftime()
    },
    computed: {
        
    },
    methods: {
        //获取报警服务器内容
        getSystem(){
            var params = {
                "getgsmaddr":"",
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }
            this.$http.post(this.$baseUrl, params).then((res) => {
                var srt = res.data.getgsmaddr
                srt.enable = res.data.getgsmaddr.enable == 1 ? true :false
                srt.voiceenable = res.data.getgsmaddr.voiceenable  == 1 ? true :false
                this.catIp = srt
            });
        },
        // 获取报警联系人
        getData(){
            this.$http.post(this.$baseUrl,{
            "getgsmlist":"",
            [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }).then((res)=>{
                if(res.data.getgsmlist != undefined){
                    for (let index = 0; index < res.data.getgsmlist.length; index++) {
                        res.data.getgsmlist[index].mode = res.data.getgsmlist[index].mode.toString()
                    }
                    this.tableData = res.data.getgsmlist
                }
                
            })
        },
        // 获取声光报警设备绑定子项
        getdevlist(){//获取402和数据采集器10、11、12、13 控制子项
            var params = {
                "getdevlist":"",
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }
            this.$http.post(this.$baseUrl, params).then((res) => {
                var list = res.data.getdevlist;
                this.options = []
                for(var i = 0; i < list.length; i++){
                    if(list[i].type == 22 || list[i].type == 25){
                        for(var a = 0; a < list[i].devlink.length; a++){
                            var str = {
                                value:list[i].devlink[a].uid,
                                label:list[i].devlink[a].name,
                                type:list[i].type,
                                children:[]
                            }
                            this.options.push(str)
                            var params2 = {
                                "getdevinfo":[
                                    {
                                    "uid": list[i].devlink[a].uid,
                                    "type": list[i].type,
                                    "addr": list[i].devlink[a].addr,
                                    "unittype":"id-name-ready"
                                    }
                                ],
                                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
                            }
                            this.$http.post(this.$baseUrl, params2).then((res) => {
                                var devinfo = res.data.getdevinfo[0]
                                for(var b = 0; b < this.options.length; b++){
                                    if(this.options[b].value == devinfo.uid){
                                        if(this.options[b].type == 25){ //数据采集器  10、11、12、13
                                            for(var c = 10; c < 14; c++){
                                                if(devinfo.unit[c].ready == 1){
                                                    var unit = {
                                                        value:devinfo.unit[c].id,
                                                        label:devinfo.unit[c].name,
                                                    }
                                                    this.options[b].children.push(unit)
                                                }
                                            } 
                                        }else{//402
                                            for(var c = 0; c < devinfo.unit.length; c++){
                                                if(devinfo.unit[c].ready == 1){
                                                    var unit = {
                                                        value:devinfo.unit[c].id,
                                                        label:devinfo.unit[c].name,
                                                    }
                                                    this.options[b].children.push(unit)
                                                }
                                            } 
                                        }
                                        
                                    }
                                }
                            })
                        }
                    }
                }
            })
        },
        //获取声光报警设备信息
        getdoaddr(){
            var params = {
                "getdoaddr":"",
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }
            this.$http.post(this.$baseUrl, params).then((res) => {
                var srt = res.data.getdoaddr
                srt.enable = res.data.getdoaddr.enable == 1 ? true :false
                srt.voiceenable = res.data.getdoaddr.voiceenable  == 1 ? true :false
                this.doaddr = srt
                this.cascader = [res.data.getdoaddr.uid,res.data.getdoaddr.id]
            });
        },
        //获取当前离线报警时长
        getofftime(){
            this.$http.post(this.$baseUrl,{
                "getlayout":"layout1",
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }).then((res)=>{
                if(res.data.layout1 != undefined){
                    this.offtime = res.data.layout1.devofftime
                }
                
            })
        },
        //报警服务器设置
        gsmaddr(){
            this.dialogGsmaddr = true
        },
        //关闭报警服务器设置
        closeGsmaddr(){
            this.dialogGsmaddr = false
            this.getSystem()
        },
        //声光信息弹框
        setdoaddr(){
            this.dialogDoaddr = true
        },
        //关闭声光信息弹框
        closeDoaddr(){
            this.dialogDoaddr = false
            this.getdoaddr()
        },
        //离线报警时长弹框
        setofftime(){
            this.dialogOfftime = true
        },
        //关闭离线报警时长弹框
        closeOfftimer(){
            this.dialogOfftime = false
            this.getofftime()
        },
        // 短信测试
        sendMessage () {
            if(this.phoneForm.phone == ''){ 
                return false
            }else{
                var params = {
                    "testgsm":this.phoneForm.phone.toString(),
                    [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
                }
                this.$http.post(this.$baseUrl, params).then((res) => {
                    if(res.data.result !== 'ok'){
                        this.$notify({
                            title: '发送失败',
                            type: 'warning',
                            duration: 1500
                        });
                    }else{
                        this.$notify({
                            title: '发送成功',
                            type: 'success',
                            duration: 1500
                        });
                    }
                });
            }
        },
        //添加绑定的信息
        // cascaderDoaddr(){
        //     var text = ''
        //     this.cascader.map(value => {
        //         let currentOption = this.options;
        //         this.cascaderProps.value.split('.').forEach(key => {
        //             currentOption = currentOption.find(option => option[key] === value);
        //             if(currentOption != undefined){
        //                 text = currentOption.label
        //                 for(var i = 0; i < currentOption.children.length; i++){
        //                     if(this.cascader[1] == currentOption.children[i].value){
        //                         text = text +'/'+currentOption.children[i].label
        //                     }
        //                 }
        //             }
                    
        //         });
        //     });
        //     var str = {
        //         'uid':this.cascader[0],
        //         'id':this.cascader[1],
        //         'text':text
        //     }
        //     this.doaddr.push(str)
        //     this.cascader = []
        // },
        // 添加联系人
        addItem(){
            if(this.tableData.length >= 20){
                this.$notify({
                    title: '用户添加已达到上限',
                    type: 'warning',
                    duration: 1500
                });
                return false
            }
            this.activeItem={
                telephone:"",
                name:'',
                job:'',
                department:'',
                mode:'1',
                limit:9,
            },
            this.addStatus = false
            this.dialogFormVisible =true;
        },
        // 编辑
        editItem(index){
            this.activeItem = this.tableData[index]
            this.addStatus = true
            this.dialogFormVisible =true;
        },
        // 删除
        deleteItem(index ){
            var params = {
                "deletegsm":[
                    {
                        "telephone":this.tableData[index].telephone,
                        "mode":Number(this.tableData[index].mode)
                    }
                ],
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }
            this.$http.post(this.$baseUrl,params).then((res)=>{
                if(res.data.result == 'ok'){
                    this.$notify({
                        title: '删除成功',
                        type: 'success',
                        duration: 1500
                    });
                    this.getData()
                }else{
                    this.$notify({
                        title: '删除失败',
                        type: 'warning',
                        duration: 1500
                    });
                }
            })
        },
        enableChange(data){
            console.log(data)
        },
        // 报警服务器保存
        save2(){
            var arr = {
                "ip":this.catIp.ip,
                "port":Number(this.catIp.port),
                "enable":this.catIp.enable ? 1 :0,
                "voiceenable":this.catIp.voiceenable ? 1 :0,
                "voicelimit":this.catIp.voicelimit
            }
            var params = {
                "setgsmaddr":arr,
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }
            console.log(params)
            this.$http.post(this.$baseUrl, params).then((res) => {
                this.getSystem()
                   if(res.data.result !== 'ok'){
                        this.$notify({
                            title: '修改失败',
                            type: 'warning',
                            duration: 1500
                        });
                    }else{
                        this.dialogGsmaddr = false
                        this.$notify({
                            title: '保存成功',
                            type: 'success',
                            duration: 1500
                        });
                    }
            });
        },
        // 报警用户保存
        save(){
            var str = {
                telephone:this.activeItem.telephone,
                name:this.activeItem.name,
                job:this.activeItem.job,
                department:this.activeItem.department,
                mode:Number(this.activeItem.mode),
                limit:Number(this.activeItem.limit),
            }
            if(this.activeItem.telephone.length !== 11){
                this.$message('联系人手机号码为11位长度')
                return
            }
            if(this.activeItem.name.length < 2 || this.activeItem.name.length > 6){
                this.$message('联系人名称长度为2~6之间')
                return
            }
            var params = {
                "setgsminfo":[str],
                [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
            }
            this.$http.post(this.$baseUrl,params).then((res)=>{
                if(res.data.result == 'ok'){
                    this.$notify({
                        title: '保存成功',
                        type: 'success',
                        duration: 1500
                    });
                    this.getData()
                    this.dialogFormVisible = false
                }else{
                    this.$notify({
                        title: '保存失败',
                        type: 'warning',
                        duration: 1500
                        });
                }
            })
        },
        save3(){
            if(this.cascader == []){
                this.$notify({
                        title: '请先选择设备节点',
                        type: 'warning',
                        duration: 1500
                });
            }else{
                var arr = {
                    'uid':this.cascader[0],
                    'id':this.cascader[1],
                    'enable':this.doaddr.enable ? 1 : 0,
                    'limit':this.doaddr.limit
                }
                var params = {
                    "setdoaddr":arr,
                    [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
                }
                this.$http.post(this.$baseUrl,params).then((res)=>{
                    if(res.data.result == 'ok'){
                        this.$notify({
                            title: '保存成功',
                            type: 'success',
                            duration: 1500
                        });
                        this.getdoaddr()
                        this.dialogDoaddr = false
                    }else{
                        this.$notify({
                            title: '保存失败',
                            type: 'warning',
                            duration: 1500
                        });
                    }
                })
            }
            
        },
        save4(){
            if(this.offtime == ''){
                this.$notify({
                        title: '请输入离线报警时长',
                        type: 'warning',
                        duration: 1500
                });
            }else{
                var params = {
                    "setlayout":"layout1", 
                    "layout":{
                        "devofftime":Number(this.offtime)//毫秒
                    },
                    [localStorage.getItem("cookieName")]:localStorage.getItem("_token")
                }
                this.$http.post(this.$baseUrl, params).then((res) => {
                    if(res.data.result == 'ok'){
                        this.$notify({
                            title: '保存成功',
                            type: 'success',
                            duration: 1500
                        });
                        this.getofftime()
                        this.dialogDoaddr = false
                    }else{
                        this.$notify({
                            title: '保存失败',
                            type: 'warning',
                            duration: 1500
                        });
                    }
                })
            }
        }
    },
}
</script>
<style scoped>
    .set_dengji{
        color:#fff;
        margin-left:20%;
        font-size:12px;
        margin-top:-20px;
    }
    
    /deep/ .el-table--enable-row-hover .el-table__body tr:hover>td{
        background: #7f94ad;
    }
    /deep/ .el-table--striped .el-table__body tr.el-table__row--striped td {
        background: #4e6888;
    }
    /deep/ .el-table td, .el-table th.is-leaf{
        border: none;
        background: rgb(36, 56, 72, .6);
    }
    /deep/ .el-table th, /deep/  .el-table tr{
        background-color: transparent !important;
        color: #fff;
    }
    /deep/ .el-table, .el-table__expanded-cell{
        background-color: transparent !important;
    }
    /deep/ .el-table__header-wrapper{
        /* background-color: #5f7998 !important; */
        background-color: #5981a533 !important;
        border: 1px solid #475c6f;
        border-bottom: none;
    }
    /deep/ .is-scrolling-none{
        /* background: #4e6888 !important; */
            background: rgba(89,129,165,.4) !important;
    }
    /deep/ .el-table td, .el-table th.is-leaf{
        border-bottom: 1px solid #ebeef542;
        background-color: transparent !important;
    }
     /* 清除底部横线 */
    .el-table::before {
        height: 0px;
    }
    .el-table--border::after{
        display: none;
    }
 /deep/ .el-button{
        background: rgba(89, 129, 165, 0.8);
        border: none;
        color: #fff;
    }
    /deep/ .el-dialog {
  background: rgba(79, 112, 151, 0.4) !important;
}
/deep/ .el-dialog__header {
  background: rgba(0, 0, 0, 0.2);
  color: #fff !important;
}
/deep/ .el-dialog__header .el-dialog__title {
  color: #fff !important;
}
/deep/ .el-form-item__label {
  color: #fff !important;
}
/deep/ .el-dialog__body{
        padding: 30px 135px 30px 40px;
}
.time_set{
    display: flex;
}
.time_set .el-form-item{
    margin-bottom: 0px;
    margin-left: 10px;
}
/deep/ .time_set .el-input__inner{
    background: none;
    color: #fff;
}
/deep/ .time_set .el-input-group__append, .el-input-group__prepend{
    background: #5981a5cc;
    color: #fff;
}
/deep/ .el-input.is-active .el-input__inner,/deep/ .el-input__inner:focus{
    border-color: #fff;
}
.zhushi{
        margin-top: -10px;
        margin-bottom: 10px;
        color: #e6a23c;
        font-size: 12px;
    }
.fangshi{
    color: #fff;
    /* margin-left: 10px; */
}
.fangshi1{
    color: #cecece;
    margin-left: 10px;
    margin-right: 10px;
}
.fangshi2{
    color: #fdba00;
    margin-left: 10px;
    margin-right: 10px;
}
.warndy{
    margin-left: 10px;
}
/* ip */
.right{
    float: left;
}
.left{
    float: right;
}
.catIP_top{
    float: left;
    color: #dadada;
    letter-spacing: 1px;
}
.catIP .el-input{
    float:left;
    width: 70px;
    margin-left: 5px;
}
/deep/ .catIP .el-input .el-input__inner{
    background-color: #fff0;
    color: #fff;
}
.cascaderBut{
    margin-left: 10px;
}
</style>
